package com.myPlaneGame.obj;

import com.myPlaneGame.GameCreate;

import java.awt.*;

public class Bgobj extends GameObj{

    public Bgobj(Image img, int x, int y, double speed) {
        super(img, x, y, speed);
    }

    public Bgobj() {
        super();
    }

    public Bgobj(Image img, int width, int height, int x, int y, double speed, GameCreate frame) {
        super(img, width, height, x, y, speed, frame);
    }

    @Override
    public void paintSelf(Graphics g) {
        super.paintSelf(g);
        y+=speed;
        if(y>=0){
            y=-1000;
        }
    }

    @Override
    public Rectangle getRec() {
        return super.getRec();
    }
}
